#include "join_threads.h"

join_threads::join_threads(vector<thread> &threads)
: _threads(threads)
{
}
join_threads::~join_threads()
{
    for(size_t i = 0; i < _threads.size(); ++i)
    {
        if(_threads[i].joinable())
        {
            _threads[i].join();
        }
    }
}